<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>计算个人工资</title>
    <script>
        function calculateSalary() {
            // 获取输入框的值
            var name = document.getElementById('name').value;
            var salary = parseFloat(document.getElementById('salary').value);
            var deduction = parseFloat(document.getElementById('deduction').value);

            // 计算实发工资
            var actualSalary = salary - deduction;

            // 显示结果
            alert("姓名：" + name + "\n应发工资：" + salary + "\n扣款：" + deduction + "\n实发工资：" + actualSalary);
        }
    </script>
</head>
<body>
    <h1>计算个人工资</h1>
    <form>
        <label for="name">姓名：</label>
        <input type="text" id="name" placeholder="输入姓名"><br><br>
        
        <label for="salary">应发工资：</label>
        <input type="text" id="salary" placeholder="输入应发工资"><br><br>
        
        <label for="deduction">扣款：</label>
        <input type="text" id="deduction" placeholder="输入扣款"><br><br>
        
        <input type="button" value="提交" onclick="calculateSalary()">
    </form>
</body>
</html>